package com.best.oasis.settlement.common.enum.excel
{
	import flash.utils.Dictionary;
	
	import mx.resources.ResourceManager;
	/**
	 * 导入的Excel错误类型
	 */
	public class ExcelErrorType
	{
		/**
		 * 没有错误
		 */
		public static const NOERROR:String = "NOERROR";
		/**
		 * 没有数据
		 */	
		public static const NO_DATA:String = "NO_DATA";
		
		//导入费用类型时，解析excel的错误
		/**
		 * 费用的行号为空
		 */	
		public static const ROW_NUMBER_EMPTY:String="ROW_NUMBER_EMPTY";		
		/**
		 * 费用的行号不是数字
		 */	
		public static const ROW_NUMBER_NOT_NUMBER:String="ROW_NUMBER_NOT_NUMBER";	
		/**
		 * 费用的TMS TO号为空
		 */	
		public static const TO_NUMBER_EMPTY:String="TO_NUMBER_EMPTY";		
		/**
		 * 费用类型名称为空
		 */	
		public static const FEETYPE_NAME_EMPTY:String="FEETYPE_NAME_EMPTY";	
		/**
		 * 导入的费用类型名称不存在
		 */	
		public static const FEETYPE_NAME_NOT_EXIST:String="FEETYPE_NAME_NOT_EXIST";	
		/**
		 * 导入的费用类型名称与当前申请类型不匹配
		 */	
		public static const FEETYPE_NAME_NOT_MATCH:String="FEETYPE_NAME_NOT_MATCH";	
		/**
		 * 该申请类型中，当前费用类型名称存在重名
		 */	
		public static const FEETYPE_NAME_DOUBLED:String="FEETYPE_NAME_DOUBLED";	
		/**
		 * 费用的金额为空
		 */	
		public static const AMOUNT_EMPTY:String="AMOUNT_EMPTY";				
		/**
		 * 费用的金额不是数字
		 */	
		public static const AMOUNT_NOT_NUMBER:String="AMOUNT_NOT_NUMBER";				
		/**
		 * 费用的成本中心与当前付款选择的部门不匹配
		 */	
		public static const COST_CENTER_NOT_MATCH:String="COST_CENTER_NOT_MATCH";	
		/**
		 * 导入的费用成本中心不存在
		 */	
		public static const COST_CENTER_CODE_NOT_EXIST:String="COST_CENTER_CODE_NOT_EXIST";
		
		//导入的银行收款项目时，解析excel的错误
		/**
		 * 收款日期为空
		 */	
		public static const PAY_DAY_EMPTY:String="PAY_DAY_EMPTY";
		/**
		 * 入账银行编码为空
		 */	
		public static const BANK_CODE_EMPTY:String="BANK_CODE_EMPTY";
		/**
		 * 入账银行编码不存在
		 */	
		public static const BANK_CODE_NOT_EXIST:String="BANK_CODE_NOT_EXIST";
		/**
		 * 入账支行名为空
		 */	
		public static const BANK_NAME_EMPTY:String="BANK_NAME_EMPTY";
		/**
		 * 付款方名为空
		 */	
		public static const PAYER_NAME_EMPTY:String="PAYER_NAME_EMPTY";
		/**
		 * 付款方账户为空
		 */	
		public static const PAY_BANK_ACCOUNT_CODE_EMPTY:String="PAY_BANK_ACCOUNT_CODE_EMPTY";
		/**
		 * 收款金额为空
		 */	
		public static const PAY_AMOUNT_EMPTY:String="PAY_AMOUNT_EMPTY";
		/**
		 * 收款金额不是数字
		 */	
		public static const PAY_AMOUNT_IS_NOT_NUMBER:String="PAY_AMOUNT_IS_NOT_NUMBER";
		/**
		 * 收款类型为空
		 */	
		public static const PAY_TYPE_EMPTY:String="PAY_TYPE_EMPTY";
		/**
		 * 数据库中不存在当前收款类型
		 */	
		public static const PAY_TYPE_NOT_EXIST:String="PAY_TYPE_NOT_EXIST";
		/**
		 * 类别为空
		 */	
		public static const PAY_TYPE2_EMPTY:String = "PAY_TYPE2_EMPTY";
		/**
		 * 数据库中不存在当前类别
		 */	
		public static const PAY_TYPE2_NOT_EXIST:String="PAY_TYPE2_NOT_EXIST";
		
		private static const excelErrors:Dictionary = new Dictionary();
		
		excelErrors[NO_DATA] = getErrorMessage(NO_DATA);
		//导入费用类型时，解析excel的错误
		excelErrors[ROW_NUMBER_EMPTY] = getErrorMessage(ROW_NUMBER_EMPTY);
		excelErrors[ROW_NUMBER_NOT_NUMBER] = getErrorMessage(ROW_NUMBER_NOT_NUMBER);
		excelErrors[TO_NUMBER_EMPTY] = getErrorMessage(TO_NUMBER_EMPTY);
		excelErrors[FEETYPE_NAME_EMPTY] = getErrorMessage(FEETYPE_NAME_EMPTY);
		excelErrors[AMOUNT_EMPTY] = getErrorMessage(AMOUNT_EMPTY);
		excelErrors[AMOUNT_NOT_NUMBER] = getErrorMessage(AMOUNT_NOT_NUMBER);
		excelErrors[COST_CENTER_NOT_MATCH] = getErrorMessage(COST_CENTER_NOT_MATCH);
		excelErrors[FEETYPE_NAME_NOT_EXIST] = getErrorMessage(FEETYPE_NAME_NOT_EXIST);
		excelErrors[FEETYPE_NAME_NOT_MATCH] = getErrorMessage(FEETYPE_NAME_NOT_MATCH);
		excelErrors[FEETYPE_NAME_DOUBLED] = getErrorMessage(FEETYPE_NAME_DOUBLED);
		excelErrors[COST_CENTER_CODE_NOT_EXIST] = getErrorMessage(COST_CENTER_CODE_NOT_EXIST);
		//导入的银行收款项目时，解析excel的错误
		excelErrors[PAY_DAY_EMPTY] = getErrorMessage(PAY_DAY_EMPTY); 
		excelErrors[BANK_CODE_EMPTY] = getErrorMessage(BANK_CODE_EMPTY); 
		excelErrors[BANK_CODE_NOT_EXIST] = getErrorMessage(BANK_CODE_NOT_EXIST); 
		excelErrors[BANK_NAME_EMPTY] = getErrorMessage(BANK_NAME_EMPTY); 
		excelErrors[PAYER_NAME_EMPTY] = getErrorMessage(PAYER_NAME_EMPTY); 
		excelErrors[PAY_BANK_ACCOUNT_CODE_EMPTY] = getErrorMessage(PAY_BANK_ACCOUNT_CODE_EMPTY); 
		excelErrors[PAY_AMOUNT_EMPTY] = getErrorMessage(PAY_AMOUNT_EMPTY); 
		excelErrors[PAY_AMOUNT_IS_NOT_NUMBER] = getErrorMessage(PAY_AMOUNT_IS_NOT_NUMBER); 
		excelErrors[PAY_TYPE_EMPTY] = getErrorMessage(PAY_TYPE_EMPTY); 
		excelErrors[PAY_TYPE_NOT_EXIST] = getErrorMessage(PAY_TYPE_NOT_EXIST); 
		excelErrors[PAY_TYPE2_EMPTY] = getErrorMessage(PAY_TYPE2_EMPTY); 
		excelErrors[PAY_TYPE2_NOT_EXIST] = getErrorMessage(PAY_TYPE2_NOT_EXIST); 
		
		public static function getExcelError(excelError:String):String{
			return excelErrors[excelError];
		}
		public static function getErrorMessage(errType:String):String{
			return ResourceManager.getInstance().getString("messages", "ExcelErrors_" + errType);
		}
		public function ExcelErrorType()
		{
		}
	}
}